const nav = {
	state: {
		// 状态栏的高度
		statusBarHeight:0,
		// 导航栏高度
		navBarHeight:50,
		// 胶囊加编剧宽度
		menuWidth:100,
	},
	mutations: {
		
	},
	actions: {
		getNavBarInfo({state,commit}){
			// 获取状态栏高度
			let phoneInfo = uni.getSystemInfoSync()
			state.statusBarHeight = phoneInfo.statusBarHeight
			// console.log(phoneInfo);
			// 获取导航栏高度
			// #ifdef MP-WEIXIN
			let menuInfo = uni.getMenuButtonBoundingClientRect()
			state.navBarHeight = menuInfo.height + (menuInfo.top - state.statusBarHeight) * 2
			state.menuWidth = (phoneInfo.screenWidth - menuInfo.right) * 2 + menuInfo.width
			// console.log(menuInfo);
			// #endif
		}
	},
	getters: {
		
	}
}

export default nav
